<%@page import="java.util.Random"%>
<%@page import="com.xy2401.example.util.IdeaKeygen_14"%>
<%@page import="com.xy2401.example.util.IdeaKeygen_13"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%
   String name_13 = request.getParameter("name_13");
   String name_14 = request.getParameter("name_14");
   String key13="",key14="";
   
   if(name_13==null || "".equals(name_13)){
	   name_13 = "user";
   }
   if(name_14==null || "".equals(name_14)){
	   name_14 = "user";
   }
 
   Random r = new Random();
   key13 = IdeaKeygen_13.MakeKey(name_13, 0, r.nextInt(100000));
   key14 = IdeaKeygen_14.MakeKey(name_14, 0, r.nextInt(100000));
   
   
   
   request.setAttribute("name_13", name_13);
   request.setAttribute("name_14", name_14);
   
   request.setAttribute("key13", key13);
   request.setAttribute("key14", key14);
   
   
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title> IntelliJ IDEA 13&&14 Keygen   </title>
</head>
<body>

<h1> IntelliJ IDEA 13&&14 Keygen </h1>

<form action="" method="post">

 <h2>IntelliJ IDEA Keygen for 14</h2>
 <input name="name_14" placeholder="Enter User or company name here" style="width: 400px;"/> <br>
  User or company name: <div>${name_14}</div>   License key:  <div>${key14}</div>  
   
 <h2>IntelliJ IDEA Keygen for 13</h2>
 <input name="name_13" placeholder="Enter User or company name here" style="width: 400px;"/><br>
  User or company name: <div>${name_13}</div>  License key:   <div>${key13}</div> <br>
 

 <input type="submit" value="keygen">
</form>

</body>
</html>